<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta content="telephone=no" name="format-detection" />
    <!-- 留作将来统一添加 -->
    <TEMPLATE>${TEMPLATE}</TEMPLATE>
    <title>模板html</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css">
    <link rel="stylesheet" type="text/css" href="../../css/index.css">
    <link rel="stylesheet" type="text/css" href="../../css/data-flex.min.css">
    <style type="text/css">
        body {
            background: rgba(90, 194, 255, 1);
        }

        .container {
            margin: 15px;
            padding: 0 15px;
            background: rgba(255, 255, 255, 1);
            box-shadow: 0px 4px 10px 0px rgba(0, 135, 214, 0.37);
            border-radius: 8px;
        }

        .bor {
            height: 1px;
            background: rgb(212, 212, 212);
            transform: translateY(0.5);
        }

        .head {
            height: 67px;
        }

        .title {
            line-height: 23px;
            font-size: 15px;
            font-weight: 400;
            color: rgba(25, 25, 25, 1);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .state-success {
            min-width: fit-content;
            line-height: 23px;
            font-size: 15px;
            font-weight: 400;
            color: rgba(25, 25, 25, 1);
        }

        .state-examine {
            min-width: fit-content;
            line-height: 23px;
            font-size: 15px;
            font-weight: 400;
            color: rgba(0, 149, 235, 1);
        }

        .state-fail {
            min-width: fit-content;
            line-height: 23px;
            font-size: 15px;
            font-weight: 400;
            color: rgba(128, 128, 128, 1);
        }

        .time {
            line-height: 21px;
            font-size: 13px;
            font-weight: 400;
            color: rgba(128, 128, 128, 1);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .body {
            height: 79px;
        }

        .highlight {
            line-height: 30px;
            font-size: 20px;
            font-weight: 500;
            color: rgba(255, 101, 24, 1);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .lowlight {
            line-height: 23px;
            font-size: 13px;
            font-weight: 400;
            color: rgba(128, 128, 128, 1);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .footer {
            height: 50px;
        }

        .footer-text {
            min-width: fit-content;
            font-size: 15px;
            font-weight: 400;
            color: rgba(25, 25, 25, 1);
        }

        .footer-highlight {
            font-size: 15px;
            font-weight: 400;
            color: rgba(226, 83, 83, 1);
            margin-left: 5px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
</head>

<body>
    <div class="vueApp" v-cloak>
        <div v-if="listData.length > 0">
            <div class="container" v-for="item in listData" @click="handleItem(item)">
                <div class="head" data-flex="cross:center">
                    <div data-flex-box="1">
                        <div data-flex="main:justify cross:center">
                            <div class="title">提现单号:&nbsp;{{ item.recordNumber }}</div>
                            <div class="state-success" v-if="item.auditStatus == 2">已提现</div>
                            <div class="state-examine" v-if="item.auditStatus == 1">审核中</div>
                            <div class="state-fail" v-if="item.auditStatus == 3">提现失败</div>
                        </div>
                        <div class="time">{{ item.createDate }}</div>
                    </div>
                </div>
                <div class="bor"></div>
                <div class="body" data-flex="cross:center">
                    <div>
                        <div class="highlight">¥{{ item.tradeMoney }}</div>
                        <div class="lowlight">
                            {{ item.accountType == 1 ? '银行卡' : '支付宝' }}账户:&nbsp;{{ item.accountType == 1 ? item.bankNo : item.alipayAccount }}
                        </div>
                    </div>
                </div>
                <div class="bor" v-if="item.auditStatus == 3"></div>
                <div class="footer" v-if="item.auditStatus == 3" data-flex="cross:center">
                    <div class="footer-text">提现失败原因:</div>
                    <div class="footer-highlight">{{ item.auditReason }}</div>
                </div>
            </div>
        </div>
        <div v-else-if="isLoad" class="data-null">
            <p>暂时没有更多数据哦</p>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/service/service-tool.js"></script>
<script type="text/javascript" src="../../script/service/service-app.js"></script>
<script type="text/javascript" src="../../script/service/service-user.js"></script>
<script type="text/javascript" src="../../script/service/service-logic.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript">
    // html 的引号一律为双引号(""),js 为单引号('')
    var USER, $S, vm;
    apiready = function () {
        $S = SERVICE();
        USER = USER();
        console.log(JSON.stringify(api.pageParam) + '=====pageParam');
        fnInit();
    };
    // 初始化
    function fnInit() {
        vm = new Vue({
            el: '.vueApp',
            data: {
                pageNo: 1,
                pageSize: 10,
                listData: [],
                isLoad: false
            }
        });
        load();
    }

    function load() {
        getPageData('headerRefreshing');
        fnAddHeaderRefreshingEvent(function () { //设置下拉刷新
            getPageData('headerRefreshing');
        });

        fnAddFooterLoadingEvent(function () { // 设置上拉加载
            getPageData('load');
        });
    }

    function getPageData(sign) {
        if (sign == 'headerRefreshing') {
            vm.pageNo = 1;
        } else {
            vm.pageNo++;
        }
        var url = 'my/getWithdrawalsRecordList';
        var params = {
            'pageNo': vm.pageNo,
            'pageSize': vm.pageSize
        };
        var callback = function (data) {
            if (vm.pageNo == '1') {
                vm.listData = [];
            }
            var listData = data.listData;
            for (var i = 0; i < listData.length; i++) {
                var item = listData[i];
                item.createDate = formatTime(item.createDate, 'order_data');
                item.tradeMoney = Math.abs(item.tradeMoney);
            }
            api.refreshHeaderLoadDone();
            vm.listData = vm.listData.concat(listData);
            vm.isLoad = true;
            // status 为200时,只返回data
        };
        POST(url, params, callback);
    }

    function handleItem(item) {

    }
</script>

</html>